# encoding=utf-8
from seg_common.BatchLoader.BatchLoaderFactory import BatchLoaderFactory
from seg_system import ApplicationConfig
from torch.utils.data import DataLoader


class BatchCommonDataLoader:
    @staticmethod
    def make_data_loader(dataset: BatchLoaderFactory,
                         batch_size: int = ApplicationConfig.SystemConfig.BATCH_SIZE,
                         shuffle=False, pin_memory=False, drop_last=False, **kwargs):
        return DataLoader(dataset, batch_size=batch_size,
                          shuffle=shuffle, pin_memory=pin_memory, drop_last=drop_last, **kwargs)
